/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cadi.aux;

//import static com.cadi.aux.Window.styleText;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JLayeredPane;
import javax.swing.JOptionPane;

/**
 *
 * @author ApoZuniga
 */
public class CounterIntermediate extends Window{
    private JLabel instruction;
    private JLabel imageInstruction;
    protected Coin objectOne;
    protected Coin objectTwo;
    protected Coin objectThree;
    protected Coin objectFour;
    protected Coin objectFive;
    protected JButton optionTotalOne;
    protected JButton optionTotalTwo;
    protected JButton optionTotalThree;
    protected ActionListener listenerGood;
    protected ActionListener listenerBad;
    protected int currentLevel;

    public CounterIntermediate() {
        super();
        instruction = new JLabel("¿Cuál es el total que se forma con los billetes y/o monedas mostrados?");
        instruction.setFont(styleText);
        instruction.setBounds(50, -50, 800, 300);
        imageInstruction = new JLabel(new ImageIcon(getClass().getResource("/resources/globoCuentas.png")));
        imageInstruction.setBounds(140, 290, 200, 162);
        this.container.add(imageInstruction, JLayeredPane.PALETTE_LAYER); 
        this.container.add(instruction, JLayeredPane.PALETTE_LAYER);
        window.setVisible(true);
    }
    
     public void totalActionPerformed(ActionEvent evt, int answer) {
        if (answer == 1) {
            result = java.applet.Applet.newAudioClip(getClass().getResource("/resources/bien.wav"));
            result.play();
            JOptionPane.showMessageDialog(null, "¡Bien Hecho!", "¡Bien Hecho!", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(getClass().getResource("/resources/right.png")));
        } else {
            result = java.applet.Applet.newAudioClip(getClass().getResource("/resources/mal.wav"));
            result.play();
            JOptionPane.showMessageDialog(null, "Intenta de nuevo", "Intenta de nuevo", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(getClass().getResource("/resources/wrong.png")));
        }
    }
}